<template>
  <div class="login-page">
   
  </div>
</template>

<script setup lang="ts">

const isFederationEnv = () => {
  // 检查全局是否存在模块联邦的共享作用域对象
  return typeof window !== 'undefined' &&
    ((window as any).__federation_shared__ !== undefined ||
      (window as any).shared !== undefined);
};

const isFed = isFederationEnv();

console.log("是否为模块联邦", isFed);

defineOptions({
  name: "LoginView",
  components: {}
});

import { useLoginStore } from "../store/loginStore";

const dataEvent = (data: any) => {
  console.log("子组件收到数据了", data);
}

defineExpose({
  dataEvent
})

// 2. 实例化组合式 store
const loginStore = useLoginStore();

// 验证存储结果
console.log("存储后 Pinia 中的值：", loginStore.sendLoginCmd);


</script>

<style lang="scss" scoped>

</style>
